﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ManageCode.ascx.cs"
    Inherits="Viewer.Code.UserControls.ManageCode" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<ext:Window ID="wdListCode" runat="server" Title="List Code" Width="600"  AutoHeight="true" Modal="true" BodyCssClass="window">
    <Items>
        <ext:GridPanel ID="grdListCode" runat="server" AutoExpandColumn="LoaiMa">
            <ColumnModel>
                <Columns>
                    <ext:CommandColumn Width="40">
                        <Commands>
                            <ext:GridCommand>
                                <Menu>
                                    <Items>
                                        <ext:MenuCommand CommandName="Add" Text="Tạo mới" Icon="Add" />
                                        <ext:MenuCommand CommandName="View" Text="Xem chi tiết" Icon="LayoutHeader" />
                                        <ext:MenuCommand CommandName="Edit" Text="Sửa" Icon="ApplicationEdit" />
                                        <ext:MenuCommand CommandName="Delete" Text="Xóa" Icon="Delete" />
                                    </Items>
                                </Menu>
                            </ext:GridCommand>
                        </Commands>
                    </ext:CommandColumn>
                    <ext:Column Width="" Header="Loại Mã" DataIndex="LoaiMa" />
                    <ext:Column Width="" Header="Ghi Chú" DataIndex="GhiChu" />
                </Columns>
            </ColumnModel>
            <Store>
                <ext:Store runat="server">
                    <Reader>
                        <ext:JsonReader IDProperty="ID">
                            <Fields>
                                <ext:RecordField Name="LoaiMa" />
                                <ext:RecordField Name="GhiChu" />
                            </Fields>
                        </ext:JsonReader>
                    </Reader>        
                </ext:Store>
             </Store>
        </ext:GridPanel>
    </Items>
    <Buttons>
        <ext:Button runat="server" Text="Đóng"  Icon="Cancel">
            <Listeners>
                <Click Handler="#{wdListCode}.hide();" />
            </Listeners>
        </ext:Button>
    </Buttons>
</ext:Window>

